.class Lcom/xiaomi/notes/NoteListActivity$19;
.super Ljava/lang/Object;
.source "NoteListActivity.java"

# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/xiaomi/notes/NoteListActivity;->callDialogToSend(I)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/xiaomi/notes/NoteListActivity;

.field final synthetic val$type:I


# direct methods
.method constructor <init>(Lcom/xiaomi/notes/NoteListActivity;I)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 1094
    iput-object p1, p0, Lcom/xiaomi/notes/NoteListActivity$19;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    iput p2, p0, Lcom/xiaomi/notes/NoteListActivity$19;->val$type:I

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
    .locals 13
    .parameter "dialog"
    .parameter "which"

    .prologue
    .line 1097
    const/4 v2, 0x0

    .line 1098
    .local v2, flag:Ljava/lang/String;
    iget v6, p0, Lcom/xiaomi/notes/NoteListActivity$19;->val$type:I

    packed-switch v6, :pswitch_data_0

    .line 1107
    :goto_0
    const/4 v6, 0x1

    if-ne p2, v6, :cond_0

    if-eqz v2, :cond_0

    .line 1109
    iget-object v6, p0, Lcom/xiaomi/notes/NoteListActivity$19;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    invoke-static {v6}, Lcom/xiaomi/notes/NoteListActivity;->access$800(Lcom/xiaomi/notes/NoteListActivity;)Lcom/xiaomi/notes/DBOperate;

    move-result-object v6

    const-string v7, "note_folder_3"

    invoke-virtual {v6, v7}, Lcom/xiaomi/notes/DBOperate;->getNums(Ljava/lang/String;)I

    move-result v3

    .line 1110
    .local v3, folderNums:I
    iget-object v6, p0, Lcom/xiaomi/notes/NoteListActivity$19;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    invoke-static {v6}, Lcom/xiaomi/notes/NoteListActivity;->access$800(Lcom/xiaomi/notes/NoteListActivity;)Lcom/xiaomi/notes/DBOperate;

    move-result-object v6

    const-string v7, "note_3"

    invoke-virtual {v6, v7}, Lcom/xiaomi/notes/DBOperate;->getNums(Ljava/lang/String;)I

    move-result v5

    .line 1112
    .local v5, notesNums:I
    new-instance v4, Landroid/content/Intent;

    const-string v6, "android.intent.action.SEND"

    invoke-direct {v4, v6}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 1113
    .local v4, intent:Landroid/content/Intent;
    new-instance v1, Ljava/io/File;

    invoke-direct {v1, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 1114
    .local v1, file:Ljava/io/File;
    iget v6, p0, Lcom/xiaomi/notes/NoteListActivity$19;->val$type:I

    packed-switch v6, :pswitch_data_1

    .line 1134
    :goto_1
    invoke-virtual {v1}, Ljava/io/File;->exists()Z

    move-result v6

    if-eqz v6, :cond_0

    .line 1135
    const-string v6, "android.intent.extra.STREAM"

    invoke-static {v1}, Landroid/net/Uri;->fromFile(Ljava/io/File;)Landroid/net/Uri;

    move-result-object v7

    invoke-virtual {v4, v6, v7}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;

    .line 1136
    const-string v6, "text/plain"

    invoke-virtual {v4, v6}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;

    .line 1137
    iget-object v6, p0, Lcom/xiaomi/notes/NoteListActivity$19;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    invoke-virtual {v6, v4}, Lcom/xiaomi/notes/NoteListActivity;->startActivity(Landroid/content/Intent;)V

    .line 1140
    .end local v1           #file:Ljava/io/File;
    .end local v3           #folderNums:I
    .end local v4           #intent:Landroid/content/Intent;
    .end local v5           #notesNums:I
    :cond_0
    return-void

    .line 1100
    :pswitch_0
    sget-object v6, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    iget-object v7, p0, Lcom/xiaomi/notes/NoteListActivity$19;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    invoke-static {v7}, Lcom/xiaomi/notes/NoteListActivity;->access$800(Lcom/xiaomi/notes/NoteListActivity;)Lcom/xiaomi/notes/DBOperate;

    move-result-object v7

    if-nez p2, :cond_1

    const/4 v8, 0x1

    :goto_2
    invoke-static {v6, v7, v8}, Lcom/xiaomi/notes/ShareData;->callBackupXml(Landroid/content/Context;Lcom/xiaomi/notes/DBOperate;Z)Ljava/lang/String;

    move-result-object v2

    .line 1101
    goto :goto_0

    .line 1100
    :cond_1
    const/4 v8, 0x0

    goto :goto_2

    .line 1103
    :pswitch_1
    sget-object v6, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    iget-object v7, p0, Lcom/xiaomi/notes/NoteListActivity$19;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    invoke-static {v7}, Lcom/xiaomi/notes/NoteListActivity;->access$800(Lcom/xiaomi/notes/NoteListActivity;)Lcom/xiaomi/notes/DBOperate;

    move-result-object v7

    if-nez p2, :cond_2

    const/4 v8, 0x1

    :goto_3
    invoke-static {v6, v7, v8}, Lcom/xiaomi/notes/ShareData;->callExportTxt(Landroid/content/Context;Lcom/xiaomi/notes/DBOperate;Z)Ljava/lang/String;

    move-result-object v2

    goto :goto_0

    :cond_2
    const/4 v8, 0x0

    goto :goto_3

    .line 1116
    .restart local v1       #file:Ljava/io/File;
    .restart local v3       #folderNums:I
    .restart local v4       #intent:Landroid/content/Intent;
    .restart local v5       #notesNums:I
    :pswitch_2
    sget-object v6, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-virtual {v6}, Lcom/xiaomi/notes/NoteListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v6

    const v7, 0x7f05003b

    const/4 v8, 0x3

    new-array v8, v8, [Ljava/lang/Object;

    const/4 v9, 0x0

    sget-object v10, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v11

    invoke-static {v10, v11, v12}, Lcom/xiaomi/notes/Tools;->getTimeMDHM(Landroid/content/Context;J)Ljava/lang/String;

    move-result-object v10

    aput-object v10, v8, v9

    const/4 v9, 0x1

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v10

    aput-object v10, v8, v9

    const/4 v9, 0x2

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v10

    aput-object v10, v8, v9

    invoke-virtual {v6, v7, v8}, Landroid/content/res/Resources;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    .line 1120
    .local v0, body:Ljava/lang/String;
    const-string v6, "subject"

    sget-object v7, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-virtual {v7}, Lcom/xiaomi/notes/NoteListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v7

    const v8, 0x7f05003a

    invoke-virtual {v7, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v4, v6, v7}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 1122
    const-string v6, "body"

    invoke-virtual {v4, v6, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    goto :goto_1

    .line 1125
    .end local v0           #body:Ljava/lang/String;
    :pswitch_3
    sget-object v6, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-virtual {v6}, Lcom/xiaomi/notes/NoteListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v6

    const v7, 0x7f05003d

    const/4 v8, 0x3

    new-array v8, v8, [Ljava/lang/Object;

    const/4 v9, 0x0

    sget-object v10, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v11

    invoke-static {v10, v11, v12}, Lcom/xiaomi/notes/Tools;->getTimeMDHM(Landroid/content/Context;J)Ljava/lang/String;

    move-result-object v10

    aput-object v10, v8, v9

    const/4 v9, 0x1

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v10

    aput-object v10, v8, v9

    const/4 v9, 0x2

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v10

    aput-object v10, v8, v9

    invoke-virtual {v6, v7, v8}, Landroid/content/res/Resources;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    .line 1129
    .restart local v0       #body:Ljava/lang/String;
    const-string v6, "subject"

    sget-object v7, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-virtual {v7}, Lcom/xiaomi/notes/NoteListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v7

    const v8, 0x7f05003c

    invoke-virtual {v7, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v4, v6, v7}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 1131
    const-string v6, "body"

    invoke-virtual {v4, v6, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    goto/16 :goto_1

    .line 1098
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch

    .line 1114
    :pswitch_data_1
    .packed-switch 0x0
        :pswitch_2
        :pswitch_3
    .end packed-switch
.end method
